﻿using UnityEngine;
using System.Collections;

public class ReadyRoomScript : MonoBehaviour {
	
	public UISprite hostPanel;
	public UISprite partnerPanel;
	public UISprite mapPanel;
	
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	public void updatePanels(int ID)
	{
		if(ID < 10)
			partnerPanel.spriteName = "btn06_0" + (ID + 2).ToString();
		else
			partnerPanel.spriteName = "btn06_" + (ID + 2).ToString();
	}
	
	public void hostUpdate()
	{
		if(DataScript.GetCurrentCharacter() < 10)
			hostPanel.spriteName = "btn06_0" + (DataScript.GetCurrentCharacter() + 2).ToString();
		else
			hostPanel.spriteName = "btn06_" + (DataScript.GetCurrentCharacter() + 2).ToString();

		partnerPanel.spriteName = "btn06_01";
	}
	
	public void partnerUpdate(int hostID)
	{
		Debug.Log((hostID + 2).ToString());
		if(hostID < 10)
			hostPanel.spriteName = "btn06_0" + (hostID + 1).ToString();
		else
			hostPanel.spriteName = "btn06_" + (hostID + 1).ToString();

		if(DataScript.GetCurrentCharacter() < 10)
			partnerPanel.spriteName = "btn06_0" + (DataScript.GetCurrentCharacter() + 2).ToString();
		else
			partnerPanel.spriteName = "btn06_" + (DataScript.GetCurrentCharacter() + 2).ToString();
	}
	
	public void ExitPanelUpdate()
	{
		partnerPanel.spriteName = "btn06_01";
	}
}
